package com.cryptoneedle.garden.entity.garden.config;


import com.bubbles.engine.data.core.entity.BaseEntity;
import com.cryptoneedle.garden.enums.ConfigPropertyTypeEnum;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.annotations.Comment;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

/**
 * <p>description: 配置属性 </p>
 *
 * @author CryptoNeedle
 * @date 2025-09-25
 */
@Getter
@Setter
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(schema = "public", name = "config_property")
@Comment("配置属性")
public class ConfigProperty extends BaseEntity {

    @Id
    @Column(length = 64)
    @Comment("配置项")
    private String name;

    @Column(length = 1024)
    @Comment("配置值")
    private String value;

    @Column(length = 64)
    @Comment("配置说明")
    private String comment;

    @Column(length = 64)
    @Comment("配置方式")
    @Enumerated(EnumType.STRING)
    private ConfigPropertyTypeEnum type;
}